import axios from "axios";

const user_service = axios.create({
    // baseURL: "http://localhost:8081/v1",
    baseURL: "/v1",
})

let user = {}

user.login = (data) => {
    return user_service({
        url: '/login',
        data,
        method: 'post'
    })
}
user.getArticleDetails = (data) => {
    return user_service({
        url: '/get_article_details',
        data,
        method: 'post'
    })
}

user.getSorts = () => {
    return user_service({
        url: '/getSorts',
        method: 'get'
    })
}

user.getArticleList = () => {
    return user_service({
        url: '/getArticleList',
        method: 'get'
    })
}

user.pagingFind = (data) => {
    return user_service({
        url: '/pagingFind',
        data,
        method: 'post'
    })
}

user.getClassifyList = (data) => {
    return user_service({
        url: '/getClassifyList',
        data,
        method: 'post'
    })
}

user.getClassifyPaging = (data) =>{
    return user_service({
        url: '/getClassifyPaging',
        data,
        method: 'post'
    })
}

user.searchArticle = (data) =>{
    return user_service({
        url: '/searchArticle',
        data,
        method: 'post'
    })
}
export default user